package com.mhyx.pojo;

import com.alibaba.nacos.api.config.ConfigType;
import com.alibaba.nacos.api.config.annotation.NacosConfigurationProperties;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 *
 * @User: c.c
 * @Date: 2022/6/17
 * @Time: 13:40
 * @Description:
 */
@Component
//添加 @ConfigurationProperties 注解，并设置 prefix = "user" 属性，这样它就可以读取前缀为 user 配置项，设置到配置类对应的属性上。
@ConfigurationProperties(prefix = "user")
// @NacosConfigurationProperties(prefix = "user", dataId = "${nacos.config.data-id}", type = ConfigType.YAML)
@Data
public class TestNacosSetting {
  private String id ;
  private Integer age;
  private String names;
  private Integer payTimeOut;
}
